﻿CREATE PROCEDURE [dbo].[AddPersonMark]
	@Mark uniqueidentifier,
    @Person uniqueidentifier,
    @CreatedBy uniqueidentifier,
    @IsDeleted bit,
	@CreatedOn datetime,
    @LastChanged datetime,
	@LastChangedBy uniqueidentifier,

	@TimeStamp timestamp output

AS

	INSERT INTO PersonMark

	(Mark, Person, CreatedBy, IsDeleted, CreatedOn, LastChanged, LastChangedBy)

	VALUES 

	(@Mark, @Person, @CreatedBy, @IsDeleted, @CreatedOn, @LastChanged, @LastChangedBy)

	SELECT @TimeStamp = [TimeStamp]

	FROM PersonMark WHERE Mark=@Mark AND Person=@Person

RETURN 0